<#include "/common/head.html"/>

 <div class="easyui-panel addPage" data-options="fit:true,border:false,novalidate:true">
    <form class="easyui-form" id="ff" method="post" data-options="novalidate:true" enctype="multipart/form-data">
        <table class="table1">
        	 <tr>
           		<th><span>文件路径：</span></th>
               	<td><input class="easyui-filebox" name="file_path" value="" data-options="prompt:'请选择文件...',buttonText:'&nbsp;选&nbsp;择&nbsp;',required:true" style="width:200px"></input>
				</td>
			</tr>
		</table>
	</form>
</div>
<script>
top.window.subPage.save = save;
function save() {
	if($("#ff").form('enableValidation').form('validate')) {	 
		$.post("importCsv", getParam(), function(data) {
			top.window.closeWindow();
			top.window.subPage.loadCurrDatagrid();
		});
	}
}
function getParam() {
	var param = {
	    "headId": ${headId}, 
       	"file_path": $(":input[name='file_path']").val()
	};
	for(key in param) {
		if(!param[key]) {
			delete param[key];
		}
	}
	return param;
}
</script>
<#include "/common/foot.html"/>